﻿using lingopen.Application.Jabil.Models.TTS;
using lingopen.Entity.CNC;
using lingopen.Entity.EPC;
using System.Collections.Generic;

namespace lingopen.Application.Jabil
{
    public interface IEPCAppService : IAppService
    {
        /// <summary>
        /// 查询EPC绑定信息
        /// </summary>
        /// <param name="pagination">分页</param>
        /// <param name="keyword">关键字</param>
        /// <returns></returns>
        PagedData<EPC_Banding> Query_EPC_Bandings(Pagination pagination, string keyword, string type);

        /// <summary>
        /// 查询CNC机台传输数据
        /// </summary>
        /// <param name="pagination">分页</param>
        /// <param name="keyword">关键字</param>
        /// <returns></returns>
        PagedData<CNC_Transfer> Query_CNC_Transfers(Pagination pagination, string keyword, string type);
        /// <summary>
        /// 产品追溯查询
        /// </summary>
        /// <param name="pagination"></param>
        /// <param name="keyword"></param>
        /// <returns></returns>
        List<ProdItem> Query_TTS_Prods( string keyword);

        /// <summary>
        /// 上料确认
        /// </summary>
        /// <param name="tool_code">治具码</param>
        /// <param name="prod_code">产品码</param>
        /// <returns></returns>
        bool Check_Link(string tool_code, string prod_code, string type);
        /// <summary>
        /// 绑码
        /// </summary>
        /// <param name="input">入参</param>
        /// <param name="type">lin5 或 link7</param>
        /// <returns></returns>
        EPC_Banding Banding(Add_EPC_Banding input, string type);
        /// <summary>
        /// 已过站确认
        /// </summary>
        /// <param name="prod_Code"></param>
        /// <param name="fix_code"></param>
        /// <param name="type"></param>
        /// <returns></returns> 
        bool Pass_Repeate(string prod_Code,string fix_code,string type);
        bool Check_Repeate(string prod_Code, string fix_code, string type);
        bool Check_Flow(string prod_code, string fix_code, string type);
        /// <summary>
        /// 查询绑码信息
        /// </summary>
        /// <param name="tool_code">治具码</param>
        /// <param name="type">类型</param>
        /// <returns></returns>
        EPC_Banding Get_Banding(string tool_code, string type);
    }
}
